import axios from 'axios'
const request = {
    get(url,callback){
        axios.get(url).then(res=>{
            callback(res.data);
        });
    },post(url,data,callback){
        axios.post(url,data).then(res=>{
            callback(res.data);
        });
    },put(url,data,callback){
        axios.put(url,data).then(res=>{
            callback(res.data);
        });
    },delete(url,callback){
        axios.delete(url).then(res=>{
            callback(res.data);
        });
    }
}
// 暴漏request
export {request};